<!doctype html>
<!--注意：引入thymeleaf的名称空间-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title data-th-text='|${priceQuote}|'></title>
</head>
<body>

    <div>
        <label style="font-weight:bold" data-th-text="#{offer.name}">名称</label> <span data-th-text="${priceQuote.getProduct().getName()}">产品名称</span>
    </div>
    <div>
        <label style="font-weight:bold" data-th-text="#{offer.profile}">摘要</label> <span data-th-text='|${priceQuote.attrs().str("description")}|'>产品摘要</span>
    </div>
    <div>
        <label style="font-weight:bold" data-th-text="#{offer.description}">详情</label> <span data-th-text='|${priceQuote.getProduct().attrs().filter2("price,money,flag,path")}|'>产品详情</span>
    </div>
    <div>
        <label style="font-weight:bold" data-th-text="#{offer.home}">详情</label> <a data-th-href="|${priceQuoteHome}|"><span data-th-text='${priceQuoteHome}'>产品详情</span></a>
    </div>
    <div>
        <label style="font-weight:bold;" data-th-text="#{offer.cost}">成本</label> <span data-th-text="${priceQuote.getProduct().getPrice()}" style="text-decoration:line-through">产品成本</span>
    </div>
    <div>
        <label style="font-weight:bold" data-th-text="#{offer.price}">价格</label> <span data-th-text="${priceQuote.getUnitPrice()}">产品价格</span>
    </div>
    <div>
        <label style="font-weight:bold" data-th-text="#{offer.enterprise}">企业</label> <span data-th-text="${priceQuote.getOwner()}">出品企业</span>
    </div>
    <div>
        <label style="font-weight:bold" data-th-text="#{offer.country}">国家地区</label> <span data-th-text="${#locale.country}">中国</span>
    </div>
    
    <hr>
    
    <!-- 展示图 -->
    <label style="font-weight:bold;" data-th-text="#{offer.demostration}">展示图</label>:<br>
    <a data-th-href='|/mall/media/streamfile?file=${demostration}|'>
       <img data-th-src='|/mall/media/streamfile?file=${demostration}|' data-th-style='|width: ${width}px;|' />
    </a>
    
    <!-- 预览图 -->
    <div data-th-if="${previewfiles}" data-th-style="|width: ${width}px; overflow-y: hidden;overflow-x:auto;white-space: nowrap|">
        <a data-th-each="file:${previewfiles}" data-th-href="|/mall/media/streamfile?file=${file}|" >
            <img  data-th-src="|/mall/media/streamfile?file=${file}|" style='height: 100px;'></img>
        </a>
    </div>
    
    <hr>
    <!-- 文件清单 -->
    <label style="font-weight:bold" data-th-text="#{offer.files}">展示图</label>:<br>
    <table>
        <tr data-th-each="file:${files}">
            <td data-th-switch="${file['extension']} ">
                <a data-th-case="txt" data-th-href="|/mall/media/streamfile?file=${file['path']}|">
                    <span data-th-text="|${file['path']}|" data-th-style='|width: ${width}px;|'></span>
                </a><a data-th-case="xlsx" data-th-href="|${file['path']}|" >
                    <span  data-th-text="|file=${file['path']}|" data-th-style='|width: ${width}px;|'></span>
                </a><a data-th-case="htm" data-th-href="|/mall/media/streamfile?file=${file['path']}|" >
                    <span  data-th-text="|${file['path']}|" data-th-style='|width: ${width}px;|'></span>
                </a><a data-th-case="html" data-th-href="|/mall/media/streamfile?file=${file['path']}|" >
                    <span  data-th-text="|${file['path']}|" data-th-style='|width: ${width}px;|'></span>
                </a><a data-th-case="mp3" data-th-href="|/mall/media/streamfile?file=${file['path']}|" >
                    <audio  data-th-src="|/mall/media/streamfile?file=${file['path']}|" data-th-style='|width: ${width}px;|' controls></audio>
                </a><a data-th-case="mp4" data-th-href="|/mall/media/streamfile?file=${file['path']}|" >
                    <video  data-th-src="|/mall/media/streamfile?file=${file['path']}|" data-th-style='|width: ${width}px;|' controls></video>
                </a><a data-th-case="*" data-th-href="|/mall/media/streamfile?file=${file['path']}|" >
                    <img  data-th-src="|/mall/media/streamfile?file=${file['path']}|" data-th-style='|width: ${width}px;|'></img>
                </a>
            </td>
        </tr>
    </table>
</body>
</html>